package org.springframework.beans.factory.config;

import com.sun.istack.internal.Nullable;
import org.springframework.beans.factory.HierarchicalBeanFactory;
import org.springframework.beans.support.AbstractBeanFactory;

public interface ConfigurableBeanFactory extends SingletonBeanRegistry, HierarchicalBeanFactory {

    String SCOPE_SINGLETON = "singleton";

    String SCOPE_PROTOTYPE = "prototype";

    /**
     * 添加bean处理器
     *
     * @param beanPostProcessor
     * @return
     */
    void addBeanPostProcessor(BeanPostProcessor beanPostProcessor);

    /**
     * 获取类加载器
     *
     * @return
     */
    ClassLoader getClassLoader();

    /**
     * 设置类加载器
     *
     * @param classLoader
     * @return
     */
    void setClassLoader(@Nullable ClassLoader classLoader);

}
